package com.Maykk.systemIO;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintStream;

/**
 * @ClassName: Demo04
 * @Description: TODO 标准输出流
 * @Author: MaykkStar@163.com
 */
public class Demo04 {
    public static void main(String[] args) throws IOException {
        // PrintStream ps = System.out;
        // OutputStreamWriter ow = new OutputStreamWriter(ps);
        // BufferedWriter bw = new BufferedWriter(ow);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        bw.write("@你好，早起的鸟儿！~@"); // 可以看到此处语句被放到了最后输出，涉及到优先级问题
        System.out.println("你好早期的鸟儿！~");
        System.out.print("你好早期的鸟儿！~\n");
        System.out.printf("%-20s%20s你好早期的鸟儿！~\n","**","**");

        bw.close();
    }
}
